local skel = fk.CreateSkill {
  name = "efengqi__fuyin",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["efengqi__fuyin"] = "父荫",
  [":efengqi__fuyin"] = "锁定技，每回合限一次，当你受到【杀】或【决斗】的伤害时，若你的手牌数不大于来源，防止之。",

  ["$efengqi__fuyin1"] = "得父荫庇，平步青云。",
  ["$efengqi__fuyin2"] = "吾自幼心怀父诫，方不愧父亲荫庇。",
}

skel:addEffect(fk.DamageInflicted, {
  anim_type = "defensive",
  times = function (self, player)
    return 1 - player:usedSkillTimes(skel.name)
  end,
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(skel.name) and data.card and table.contains({"slash", "duel"}, data.card.trueName)
    and player:usedSkillTimes(skel.name) == 0 then
      return data.from and player:getHandcardNum() <= data.from:getHandcardNum()
    end
  end,
  on_use = function (self, event, target, player, data)
    data:preventDamage()
  end,
})

return skel
